<!--单级外啮合齿轮宏观参数设计-->
<template>
  <div class="base" style="overflow: auto;list-style-type: none">
    <a-row style="width:100% ; height: 100%">
      <a-col span="16" style="height: 100%">
        <div class="left" style="height: 100%;">
          <div class="u3">
            <div class="u3_font">参数</div>
          </div>
          <div class="left_top">
            <div class="left_top_left">
              <div class="left_top_left_top">
                <img src="../../../../assets/image/image_67_1.png" alt="nedci" style="width:30%; height:80%;margin: 5% 35%">
              </div>
              <div class="left_top_left_bottom">
                <div class="u5">
                  <div class="u5_font">齿轮材料基本参数</div>
                </div>
                <div class="left_top_left_bottom1">
                  <ul class="ul_style" style="height: 100%; width: 100%;text-align: right;margin-top: 5%">
                    <li >材料类型</li>
                    <li >屈服应力（MPa）</li>
                    <li >接触疲劳极限应力（MPa）</li>
                    <li >弯曲疲劳极限应力（MPa）</li>
                    <li >齿面硬度（HB）</li>
                    <li>弹性模量（MPa）</li>
                    <li>泊松比</li>
                  </ul>
                </div>
                <div class="left_top_left_bottom2">
                  <ul class="ul_style" style="text-align: center;height: 100%">
                    <li>小轮</li>
                    <li>
                      <select v-model="InParameter.material_type_p" style="height: 80%;width:60%;border-radius: 2px">
                        <option value="1">渗碳淬火</option>
                        <option value="2">调质</option>
                        <option value="3">渗氮钢</option>
                        <option value="4">结构钢</option>
                        <option value="5">感应淬火和火焰淬火钢</option>
                        <option value="6">氮碳共渗钢</option>
                      </select>
                    </li>
                    <li><input v-model="InParameter.sigma_s_p" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.sigma_Hlim_p" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.sigma_Flim_p" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.hardness_HB_p" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.E_p" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.possion_p" style="height: 80%;width:60%;"></li>
                  </ul>
                </div>
                <div class="left_top_left_bottom3">
                  <ul class="ul_style" style="text-align: center;height: 100%">
                    <li>大轮</li>
                    <li>
                      <select v-model="InParameter.material_type_w" style="height: 80%;width:60%;border-radius: 2px">
                        <option value="1">渗碳淬火</option>
                        <option value="2">调质</option>
                        <option value="3">渗氮钢</option>
                        <option value="4">结构钢</option>
                        <option value="5">感应淬火和火焰淬火钢</option>
                        <option value="6">氮碳共渗钢</option>
                      </select>
                    </li>
                    <li><input v-model="InParameter.sigma_s_w" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.sigma_Hlim_w" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.sigma_Flim_w" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.hardness_HB_w" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.E_w" style="height: 80%;width:60%;"></li>
                    <li><input v-model="InParameter.possion_w" style="height: 80%;width:60%;"></li>
                  </ul>
                </div>
              </div>
            </div>
            <div class="left_top_right">
              <div class="u6">
                <div class="u6_font">齿形参数输入</div>
              </div>
              <div class="left_top_right1">
                <ul style="position: absolute;height: 100%; width: 100%;text-align: right;margin-top: 3%">
                  <li></li>
                  <li>齿顶高系数</li>
                  <li>顶隙系数</li>
                  <li>齿根圆角半径系数</li>
                  <li>轮缘厚度系数</li>
                  <li>齿向倒角高度系数(直径)(mm)</li>
                  <li>齿向倒角角度(°)</li>
                  <li>齿顶削减量(直径)(mm)</li>
                  <li>挖根量(mm)</li>
                  <li>齿面粗糙度Rz(um)</li>
                  <li>齿根圆角粗糙度Rz(um)</li>
                  <li>齿厚上偏差(um)</li>
                  <li>齿厚公差</li>
                  <li>弯曲强度计算齿厚值(um)</li>
                </ul>
              </div>
              <div class="left_top_right2">
                <ul class="ul_style" id="ul_style" style="text-align: center;height: 100%;width: 100%;margin-top: 10%">
                  <li style="height: 6%">小轮</li>
                  <li><input v-model="InParameter.ad_factor_p" style="height:70%;width:60%;"></li>
                  <li><input v-model="InParameter.tip_factor_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.radius_factor_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.SR_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.chamfer_dia_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.chamfer_angle_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.ad_cut_dia_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.undercut_p" style="height:70%;width:60%;"></li>
                  <li><input v-model="InParameter.R_z_flank_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.R_z_root_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.thickness_reduction_p" style="height: 70%;width:60%;"></li>
                  <li><input v-model="InParameter.tooth_thickness_tolerance_p" style="height: 70%;width:60%;"></li>
                  <li>
                    <label>{{ans.thickness_reduction_last_p}}</label>
                    <select v-model="InParameter.bend_strength_thickness_p">
                      <option value="1">最小</option>
                      <option value="2">平均</option>
                      <option value="3">最大</option>
                    </select>
                  </li>
                </ul>
              </div>
              <div class="left_top_right3">
                <ul class="ul_style" style="text-align: center;height: 100%;width: 100%;margin-top: 10%">
                  <li  style="height: 6%">大轮</li>
                  <li style="height:7%;"><input v-model="InParameter.ad_factor_w" style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.tip_factor_w" style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.radius_factor_w" style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.SR_w" style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.chamfer_dia_w"  style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.chamfer_angle_w"  style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.ad_cut_dia_w"  style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.undercut_w"  style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.R_z_flank_w"  style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.R_z_root_w"  style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.thickness_reduction_w"  style="height:70%;width:60%;"></li>
                  <li style="height:7%;"><input v-model="InParameter.tooth_thickness_tolerance_w"  style="height:70%;width:60%;"></li>
                  <li style="height:7%;">
                    <label>{{ans.thickness_reduction_last_p}}</label>
                    <select v-model="InParameter.bend_strength_thickness_w">
                      <option value="1">最小</option>
                      <option value="2">平均</option>
                      <option value="3">最大</option>
                    </select>
                  </li>
                </ul>
              </div>
            </div>
          </div>
          <div class="left_bottom">
            <div class="u7">
              <div class="u7_font">载荷及相关数据输入</div>
            </div>
            <div class="left_bottom_left">
              <div class="left_bottom1">
                <ul style="height: 100%; width: 100%;text-align: right;margin-top: 3%">
                  <li style="height: 8%">小齿轮额定转速(rpm)</li>
                  <li style="height: 8%">小齿轮静强度扭矩(Nmm)</li>
                  <li style="height: 8%">运行工况</li>
                  <li style="height: 8%">允许点蚀</li>
                  <li style="height: 8%">转折点循环次数设计</li>
                  <li style="height: 8%">无限点循环次数设计</li>
                  <li style="height: 8%">设计载荷输入形式</li>
                  <li style="height: 8%"></li>
                  <li  style="height: 8%" v-show="InParameter.whether_rate_load==1">小齿轮额定载荷输入形式</li>
                  <li  style="height: 8%" v-if="InParameter.whether_rate_load==1&&InParameter.whether_torque==1">扭矩(Nmm)</li>
                  <li  style="height: 8%" v-if="InParameter.whether_rate_load==1&&InParameter.whether_torque==2">功率(kW)</li>
                  <li  style="height: 8%" v-show="InParameter.whether_rate_load==1">设计寿命(hr)</li>
                </ul>
              </div>
              <div class="left_bottom2">
                <ul style="height: 100%; width: 100%;text-align: right;margin-top: 2%">
                  <li style="height: 8%"><input v-model="InParameter.n_p" style="height: 70%;width: 80%"></li>
                  <li style="height: 8%"><input v-model="InParameter.torque_static_p" style="height: 70%;width: 80%"></li>
                  <li style="height: 8%"><select v-model="InParameter.whether_single_rotation" style="height: 80%;width: 80%;border-radius: 2px">
                    <option value="1">单向运转</option>
                    <option value="2">双向运转</option>
                  </select></li>
                  <li style="height: 8%"><select v-model="InParameter.switch_pitting" style="height: 80%;width: 80%;border-radius: 2px">
                    <option value="2">否</option>
                    <option value="1">是</option>
                  </select></li>
                  <li style="height: 8%"><select v-model="InParameter.consider_Nc" style="height: 80%;width: 80%;border-radius: 2px">
                    <option value="2">否</option>
                    <option value="1">是</option>
                  </select></li>
                  <li style="height: 8%"><select v-model="InParameter.consider_Long" style="height: 80%;width: 80%;border-radius: 2px">
                    <option value="2">否</option>
                    <option value="1">是</option>
                  </select></li>
                  <li style="height: 8%"><select v-model="InParameter.whether_rate_load" style="height: 80%;width: 80%;border-radius: 2px">
                    <option value="1">额定工况</option>
                    <option value="2">载荷谱</option>
                  </select></li>
                  <li style="height: 8%">
                    <a-upload :showUploadList="false" :maxCount="1" :customRequest="customRequest" name="file">
                      <button v-show="InParameter.whether_rate_load==2" style="width: 103%;height: 150%">导入小轮载荷谱</button>
                    </a-upload>
                    <p v-show="InParameter.whether_rate_load==2">注：载荷谱文件格式为.xls或.xlsx格式，其各列参数为右表所示(无需表头)</p>
                  </li>
                  <li style="height: 8%"><select v-show="InParameter.whether_rate_load==1" v-model="InParameter.whether_torque" style="height: 80%;width: 80%;border-radius: 2px">
                    <option value="1">输入扭矩</option>
                    <option value="2">输入功率</option>
                  </select></li>
                  <li style="height: 8%"><input v-model="InParameter.spectrum_torque" v-show="InParameter.whether_rate_load==1" style="height: 70%;width: 80%"></li>
                  <li style="height: 8%"><input v-model="InParameter.spectrum_time" v-show="InParameter.whether_rate_load==1" style="height: 70%;width: 80%"></li>
                </ul>
              </div>
            </div>
            <div class="left_bottom_center">
              <div class="left_bottom1">
                <ul style="height: 75%; width: 100%;text-align: right;margin-top: 3%;">
                  <li style="height: 12%;width: 100%">使用系数</li>
                  <li style="height: 12%;width: 100%">动载系数</li>
                  <li style="height: 12%;width: 100%">接触齿向载荷分布系数</li>
                  <li style="height: 12%;width: 100%">接触齿间载荷分布系数</li>
                  <li style="height: 12%;width: 100%">弯曲齿向载荷分布系数</li>
                  <li style="height: 12%;width: 100%">弯曲齿间载荷分布系数</li>
                  <li style="height: 12%;width: 100%">静强度使用系数</li>
                </ul>
              </div>
              <div class="left_bottom2">
                <ul style="height: 75%; width: 90%;text-align: right;margin-top: 3%;margin-left:-10%">
                  <li style="height: 12%">
                    <div>
                      <input v-model="InParameter.K_A" style="width: 60%;height: 80%">
                      <button @click="showModal10"  style="position:absolute;right:-30%;width:20%;height:6%;">!</button>
                      <a-modal
                          title="使用系数参考表"
                          :visible="visible10"
                          @ok="handleOk10"
                          @cancel="handleCancel10"
                      >
                        <img  style="width: 90%" src="../../../../assets/image/image_67_2.png">
                      </a-modal>
                    </div>
                  </li>
                  <li style="height: 12%">
                    <div>
                      <input v-model="InParameter.K_V" style="width: 60%;height: 80%">
                      <button @click="showModal11"  style="position:absolute;right:-30%;width:20%;height:6%;">!</button>
                      <a-modal
                          title="动载系数参考表"
                          :visible="visible11"
                          @ok="handleOk11"
                          @cancel="handleCancel11"
                      >
                        <img  style="width: 90%" src="../../../../assets/image/image_67_3.png">
                      </a-modal>
                    </div>
                  </li>
                  <li style="height: 12%"><input v-model="InParameter.K_Hb" style="width: 60%;height: 80%"></li>
                  <li style="height: 12%">
                    <div>
                      <input v-model="InParameter.K_Ha" style="width: 60%;height: 80%">
                      <button @click="showModal12"  style="position:absolute;right:-30%;width:20%;height:6%;">!</button>
                      <a-modal
                          title="齿间载荷分配系数参考表"
                          :visible="visible12"
                          @ok="handleOk12"
                          @cancel="handleCancel12"
                      >
                        <img  style="width: 90%" src="../../../../assets/image/image_67_4.png">
                      </a-modal>
                    </div>
                  </li>
                  <li style="height: 12%"><input v-model="InParameter.K_Fb" style="width: 60%;height: 80%"></li>
                  <li style="height: 12%">
                    <div>
                      <input v-model="InParameter.K_Fa" style="width: 60%;height: 80%">
                      <button @click="showModal13"  style="position:absolute;right:-30%;width:20%;height:6%;">!</button>
                      <a-modal
                          title="齿间载荷分配系数参考表"
                          :visible="visible13"
                          @ok="handleOk13"
                          @cancel="handleCancel13"
                      >
                        <img  style="width: 90%" src="../../../../assets/image/image_67_5.png">
                      </a-modal>
                    </div>
                  </li>
                  <li style="height: 12%"><input v-model="InParameter.K_A_s" style="width: 60%;height: 80%"></li>
                </ul>
              </div>
            </div>
            <div class="left_bottom_right">
              <div class="left_bottom1">
                <ul style="height: 100%; width: 100%;text-align: right;margin-top: 3%">
                  <li style="height:8%">接触疲劳强度安全系数</li>
                  <li style="height:8%">接触静强度安全系数</li>
                  <li style="height:8%">弯曲疲劳强度安全系数</li>
                  <li style="height:8%">弯曲静强度安全系数</li>
                  <li style="height:8%">接触长寿命系数</li>
                  <li style="height:8%">弯曲长寿命系数</li>
                  <li style="height:8%">润滑油40℃粘度(mm^2/s)</li>
                  <li style="height:8%">润滑油类型</li>
                </ul>
              </div>
              <div class="left_bottom2">
                <ul style="margin-left: 10% ;height: 100%;width: 100%;margin-top: 3%">
                  <li style="height: 8%"><input v-model="InParameter.S_H_fatigue" style="width: 60%;height: 70%"></li>
                  <li style="height: 8%"><input v-model="InParameter.S_H_static" style="width: 60%;height: 70%"></li>
                  <li style="height: 8%"><input v-model="InParameter.S_F_fatigue" style="width: 60%;height: 70%"></li>
                  <li style="height: 8%"><input v-model="InParameter.S_F_static" style="width: 60%;height: 70%"></li>
                  <li style="height: 8%"><input v-model="InParameter.Znt_Longlife" style="width: 60%;height: 70%"></li>
                  <li style="height: 8%"><input v-model="InParameter.Ynt_Longlife" style="width: 60%;height: 70%"></li>
                  <li style="height: 8%"><input v-model="InParameter.v_40" style="width: 60%;height: 70%"></li>
                  <li style="height: 8%"><select v-model="InParameter.oil_type" style="width: 60%;height: 70%">
                    <option value="1">矿物油</option>
                    <option value="2">合成油</option>
                  </select></li>
                  <button @click="showModal16"  style="position: absolute; bottom: 15%; left:-100%; width: 106%;height: 7.5%;background-color:#D7D7D7;border-radius: 4px;border: 2px #686868;">查看相关参数</button>
                  <a-modal
                      title="平行轴外啮合齿轮设计相关参数"
                      :visible="visible16"
                      @ok="handleOk16"
                      @cancel="handleCancel16"
                  >
                    <div>
                      <div style="width: 100%;height: 8%;background:#D7D7D7">相关参数</div>
                      <div style="width: 100%;height: 92%;display: flex">
                        <div class="table3" style="height: 100%;width: 40%">
                          <ul style="height: 100%">
                            <li>计算接触应力(MPa)</li>
                            <li>许用接触应力(MPa)</li>
                            <li>计算弯曲应力(MPa)</li>
                            <li>许用弯曲应力(MPa)</li>
                            <li>节圆直径(mm)</li>
                            <li>基圆直径(mm)</li>
                            <li>啮合角(°)</li>
                            <li>基圆螺旋角(°)</li>
                            <li>转速(rpm)</li>
                            <li>切向载荷(N)</li>
                            <li>径向载荷(N)</li>
                            <li>轴向载荷(N)</li>
                            <li>接触指标Kf (N/mm2)</li>
                            <li>弯曲指标UL (N/mm2)</li>
                          </ul>
                        </div>
                        <div class="table4" style="width: 60%;height: 100%;">
                          <ul style="width: 100%;height: 100%">
                            <li>
                              <div class="table5">小轮</div>
                              <div class="table5">大轮</div>
                            </li>
                            <li>
                              <div class="table5">{{ans.sigma_H_fatigue_design_p_ex}}</div>
                              <div class="table5">{{ans.sigma_H_fatigue_design_w_ex}}</div>
                            </li>
                            <li>
                              <div class="table5">{{ans.sigma_HG_p_ex}}</div>
                              <div class="table5">{{ans.sigma_HG_w_ex}}</div>
                            </li>
                            <li>
                              <div class="table5">{{ans.sigma_F_fatigue_design_p_ex}}</div>
                              <div class="table5">{{ans.sigma_F_fatigue_design_w_ex}}</div>
                            </li>
                            <li>
                              <div class="table5">{{ans.sigma_FG_p_ex}}</div>
                              <div class="table5">{{ans.sigma_FG_w_ex}}</div>
                            </li>
                            <li>
                              <div class="table5">{{ans.tran_pitch_p_ex}}</div>
                              <div class="table5">{{ans.tran_pitch_w_ex}}</div>
                            </li>
                            <li>
                              <div class="table5">{{ans.tran_base_dia_p_ex}}</div>
                              <div class="table5">{{ans.tran_base_dia_w_ex}}</div>
                            </li>
                            <li style="text-align: center">
                              <div style="width: 100%;height: 100%">{{ans.mesh_angle_ex}}</div></li>
                            <li style="text-align: center">
                              <div style="width: 100%;height: 100%">{{ans.base_helix_angle_ex}}</div>
                            </li>
                            <li>
                              <div class="table5">{{ans.n_p_ex}}</div>
                              <div class="table5">{{ans.n_w_ex}}</div>
                            </li>
                            <li style="text-align: center">
                              <div style="width: 100%;height: 100%">{{ans.tangential_load_0}}</div>
                            </li>
                            <li style="text-align: center"><div style="width: 100%;height: 100%">{{ans.radial_load_0}}</div></li>
                            <li style="text-align: center"><div style="width: 100%;height: 100%">{{ans.axial_load_0}}</div></li>
                            <li style="text-align: center"><div style="width: 100%;height: 100%">{{ans.kf_0}}</div></li>
                            <li style="text-align: center"><div style="width: 100%;height: 100%">{{ans.UL_0}}</div></li>
                          </ul>

                        </div>
                      </div>
                    </div>
                  </a-modal>
                  <button @click="tclick" style="position: absolute; bottom: 15%; width: 80%;height: 7.5%;background-color:#D7D7D7;border-radius: 4px;border: 2px #686868;">计算</button>
                  <table v-show="InParameter.whether_rate_load==2" border="1" style="position: absolute; right: 220%;width: 200%;height: 30%;margin-bottom:-4%;overflow: auto">
                    <tr style="width: 100%;height: 25%">
                      <th>序号</th>
                      <th>扭矩(Nmm)</th>
                      <th>循环次数</th>
                    </tr>
                    <tr style="width: 100%;height: 25%" v-for="(item,index) in this.spectrum" :key="index">
                      <td>{{item[0]}}</td>
                      <td>{{item[1]}}</td>
                      <td>{{item[2]}}</td>
                    </tr>
                  </table>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </a-col>
      <a-col span="8" style="height: 100%">
        <div class="right">
          <div class="u4">
            <div class="u4_font">设计模块</div>
          </div>
          <div class="right_left">
            <div class="right_left_top1">
              <li>目标齿数比</li>
            </div>
            <div class="right_left_top2">
              <input v-model="InParameter.ratio_aim" style="height: 75%;width: 80%;margin-left: 10%">
            </div>
            <div class="right_left_bottom">
              <ul style="height: 100%; width: 100%;text-align: right;margin-top: 3%">
                <li>设计法向压力角(°)</li>
                <li>设计螺旋角(°)</li>
                <li>设计宽径比</li>
                <li>参考分度圆直径(mm)</li>
                <li>参考中心距(mm)</li>
                <li>参考法向模数(mm)</li>
                <li>设计法向模数(mm)</li>
                <li>参考齿数</li>
                <li>设计齿数</li>
                <li>设计齿数比</li>
                <li>齿数比差值百分比</li>
                <li>设计齿宽(mm)</li>
                <li>标准中心距(mm)</li>
                <li>设计中心距(mm)</li>
                <li>参考法向变位系数</li>
                <li>设计法向变位系数</li>
                <li>滑动率</li>
                <li>法向齿顶宽系数</li>
                <li>轴向重合度</li>
                <li>端面重合度</li>
                <li>总重合度</li>
                <li>接触疲劳强度裕度</li>
                <li>弯曲疲劳强度裕度</li>
                <li>接触静强度裕度</li>
                <li>弯曲静强度裕度</li>
                <li>端面齿顶圆直径(mm)</li>
                <li>端面齿根圆直径(mm)</li>
                <li>节圆线速度(m/s)</li>
              </ul>
            </div>
          </div>
          <div>
            <a-modal v-model="visible">
              <p><img v-show="showimg==5" src="../../../../assets/image/image_67_6.png" class="img_style"></p>
            </a-modal>
          </div>
          <div class="right_right" display="flex">
            <ul  style="height: 100%; width: 100%; margin-top: 3%">
              <li style="text-align: center">
                <span style="margin-right: 12%">小轮</span>
                <span style="margin-left:12% ">大轮</span>
              </li>
              <li><input v-model="InParameter.press_angle" style="height: 70%; width: 80%; margin-left: 10%"></li>
              <li><input v-model="InParameter.helix_angle" style="height:65%; width: 80%; margin-left: 10%"></li>
              <li style="position: relative">
                <input v-model="InParameter.ratio_width_diameter_p" style="position: absolute; left: 10%;height:65%;width: 40%">
                <label style="position: absolute ;right: 26%; ">{{ans.ratio_width_diameter_w}}</label>
                <button @click="showModal14"  style="position:absolute;right:7%;width:10%;height:60%;">!</button>
                <a-modal
                    title="圆柱齿轮的宽径比参考表"
                    :visible="visible14"
                    @ok="handleOk14"
                    @cancel="handleCancel14"
                >
                  <img  style="width: 90%" src="../../../../assets/image/image_67_6.png">
                </a-modal>
              </li>
              <li style="position: relative">
                <label style="position: absolute ; left: 26%">{{ans.diameter_refer_strength_p}}</label>
                <label style="position: absolute ; right: 23%">{{ans.diameter_refer_strength_w}}</label>
              </li>
              <li><label style="margin-left: 40%">{{ans.center_refer_strength}}</label></li>
              <li><label style="margin-left: 40%">{{ans.normal_module_refer}}</label></li>
              <li><input v-model="InParameter.normal_module" style=" width: 80%; height:70%;margin-left: 10%"></li>
              <li style="position: relative">
                <label style="position: absolute ; left: 26%">{{ans.z_p_refer}}</label>
                <label style="position: absolute ; right: 23%">{{ans.z_w_refer}}</label>
              </li>
              <li style="position: relative">
                <input v-model="InParameter.z_p" style="position: absolute; left: 10%;height:70%;width: 40%">
                <label style="position: absolute;right: 16%; height:70%;width: 30%">{{ans.z_w}}</label>
                <select style="position: absolute; right: 5%; height: 70%;border-radius: 2px">
                  <option>0</option>
                  <option>-6</option>
                  <option>-5</option>
                  <option>-4</option>
                  <option>-3</option>
                  <option>-2</option>
                  <option>-1</option>
                  <option>1</option>
                  <option>2</option>
                  <option>3</option>
                  <option>4</option>
                  <option>5</option>
                  <option>6</option>
                </select>
              </li>
              <li><label style="margin-left: 40%">{{ans.ratio_design}}</label></li>
              <li><label style="margin-left: 40%">{{ans.ratio_different}}</label></li>
              <li><label style="margin-left: 40%">{{ans.effect_width}}</label></li>
              <li style="position: relative">
                <label style="position:absolute;margin-left: 27%"> {{ans.standard_center}}</label>
                <form style="position: absolute;right: 5%;">
                  <input type="radio" name="way" value="1" v-model="InParameter.auto_work_center">自动<br>
                  <input type="radio" name="way" value="2" v-model="InParameter.auto_work_center">手动
                </form>
              </li>
              <li v-show="InParameter.auto_work_center==1"></li>
              <li v-show="InParameter.auto_work_center==1"></li>
              <li v-show="InParameter.auto_work_center==2"><input v-model="InParameter.work_center" style="margin-left: 10%;height:70%;width: 40%"></li>
              <li v-show="InParameter.auto_work_center==2" style="position: relative">
                <label style="position: absolute ; left: 27%; height: 70%;">{{ans.equal_normal_modi_factor_p}}</label>
                <label style="position: absolute ;right: 23%; height: 70%;">{{ans.equal_normal_modi_factor_w}}</label>
              </li>
              <li style="position: relative">
                <input v-model="InParameter.normal_modi_factor_p" style="position: absolute; height:70%;left: 10%;width: 40%">
                <label style="position: absolute ;right: 27%">{{ans.normal_modi_factor_w}}</label>
              </li>
              <li style="position: relative">
                <label style="position: absolute ; left: 27%">{{ans.slip_p}}</label>
                <label style="position: absolute ; right: 23%">{{ans.slip_w}}</label>
              </li>
              <li style="position: relative">
                <label style="position: absolute ; left: 27%">{{ans.normal_width_tip_factor_p_sn}}</label>
                <label style="position: absolute ; right: 23%">{{ans.normal_width_tip_factor_w_sn}}</label>
              </li>
              <li><label style="margin-left: 40%">{{ans.axial_contact_ratio}}</label></li>
              <li><label style="margin-left: 40%">{{ans.tran_contact_ratio}}</label></li>
              <li><label style="margin-left: 40%">{{ans.total_contact_ratio}}</label></li>
              <li style="position: relative">
                <label style="position: absolute ; left: 27%">{{ans.abundant_H_fatigue_p}}</label>
                <label style="position: absolute ; right: 23%">{{ans.abundant_H_fatigue_w}}</label>
              </li>
              <li style="position: relative">
                <label style="position: absolute ; left: 27%">{{ans.abundant_F_fatigue_p}}</label>
                <label style="position: absolute ; right: 23%">{{ans.abundant_F_fatigue_w}}</label>
              </li>
              <li style="position: relative">
                <label style="position: absolute ; left: 27%">{{ans.abundant_H_static_p}}</label>
                <label style="position: absolute ; right: 23%">{{ans.abundant_H_static_w}}</label>
              </li>
              <li style="position: relative">
                <label style="position: absolute ; left:24%">{{ans.abundant_F_static_p}}</label>
                <label style="position: absolute ; right: 20%">{{ans.abundant_F_static_w}}</label>
              </li>
              <li style="position: relative">
                <label style="position: absolute ; left: 27%">{{ans.tran_practice_ad_dia_p}}</label>
                <label style="position: absolute ; right: 23%">{{ans.tran_practice_ad_dia_w}}</label>
              </li>
              <li style="position: relative">
                <label style="position: absolute ; left: 27%">{{ans.tran_de_dia_p}}</label>
                <label style="position: absolute ; right: 23%">{{ans.tran_de_dia_w}}</label>
              </li>
              <li><label style="margin-left: 40%">{{ans.v_pitch}}</label></li>
            </ul>
          </div>
        </div>
      </a-col>
    </a-row>
  </div>
</template>

<script>


import {check2_16_1,firedelete, firetext} from "@/api/file";

export default {
  created() {
    document.title='单级外啮合齿轮宏观参数设计'
    this.$store.state.file.key = 67 //设置key为自己的页面编号
  },
  data(){
    return{
      InParameter:this.$store.state.file.dataList[67],
      InParameter2:{
        uuids:[],
      },
      spectrum:[[]],
      ans:{
        ratio_width_diameter_w:"",
        diameter_refer_strength_p:"",
        diameter_refer_strength_w:"",
        center_refer_strength:"",
        normal_module_refer:"",
        z_p_refer:"",
        z_w_refer:"",
        ratio_design:"",
        ratio_different:"",
        effect_width:"",
        standard_center:"",
        normal_modi_factor_w:"",
        slip_p:"",
        slip_w:"",
        normal_width_tip_factor_p_sn:"",
        normal_width_tip_factor_w_sn:"",
        axial_contact_ratio:"",
        tran_contact_ratio:"",
        total_contact_ratio:"",
        abundant_H_fatigue_p:"",
        abundant_H_fatigue_w:"",
        abundant_F_fatigue_p:"",
        abundant_F_fatigue_w:"",
        abundant_H_static_p:"",
        abundant_H_static_w:"",
        abundant_F_static_p:"",
        abundant_F_static_w:"",
        tran_practice_ad_dia_p:"",
        tran_practice_ad_dia_w:"",
        tran_de_dia_p:"",
        tran_de_dia_w:"",
        v_pitch:"",
        thickness_reduction_last_p:"",
        thickness_reduction_last_w:"",
        z_w:"",
        equal_normal_modi_factor_p:"",
        equal_normal_modi_factor_w:"",
        sigma_H_fatigue_design_p_ex:"",
        sigma_H_fatigue_design_w_ex:"",
        sigma_HG_p_ex:"",
        sigma_HG_w_ex:"",
        sigma_F_fatigue_design_p_ex:"",
        sigma_F_fatigue_design_w_ex:"",
        sigma_FG_p_ex:"",
        sigma_FG_w_ex:"",
        tran_pitch_p_ex:"",
        tran_pitch_w_ex:"",
        tran_base_dia_p_ex:"",
        tran_base_dia_w_ex:"",
        mesh_angle_ex:"",
        base_helix_angle_ex:"",
        n_p_ex:"",
        n_w_ex:"",
        tangential_load_0:"",
        radial_load_0:"",
        axial_load_0:"",
        kf_0:"",
        UL_0:"",
      },
      form:{
        text:'static text'
      },
      form2:{
        type:1
      },
      inhibitingInput:{
        type:1
      },
      form4:{
        type:2
      },
      visible:false,
      visible1:false,
      showimg:1,
      visible10:false,
      visible11:false,
      visible12:false,
      visible13:false,
      visible14:false,
      visible16:false,
    }
  },
  mounted() {
    //绑定页面退出事件
    window.onbeforeunload = (e) => {
      e = e || window.event;
      if (e) {
        e.returnValue = '关闭提示';
      }
      this.delete()//调用自己的方法
      // Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
      return '关闭提示';
    };
  },
  methods:{
    async delete(){
      this.InParameter2.uuids=this.InParameter2.uuids.toString();//将载荷谱文件数组转成字符串
      await firedelete(this.InParameter2).then(res => {
        console.log(res);
      })
    },
    showModal10() {
      this.visible10= true;
    },
    //点击ok
    handleOk10() {
      this.visible10 = false;
    },
    //点击cancel
    handleCancel10() {
      this.visible10 = false;
    },
    showModal11() {
      this.visible11 = true;
    },
    //点击ok
    handleOk11() {
      this.visible11 = false;
    },
    //点击cancel
    handleCancel11() {
      this.visible11 = false;
    },
    showModal12() {
      this.visible12 = true;
    },
    //点击ok
    handleOk12() {
      this.visible12= false;
    },
    //点击cancel
    handleCancel12() {
      this.visible12 = false;
    },
    showModal13() {
      this.visible13 = true;
    },
    //点击ok
    handleOk13() {
      this.visible13 = false;
    },
    //点击cancel
    handleCancel13() {
      this.visible13 = false;
    },
    showModal14() {
      this.visible14 = true;
    },
    //点击ok
    handleOk14() {
      this.visible14 = false;
    },
    //点击cancel
    handleCancel14() {
      this.visible14 = false;
    },
    showModal16() {
      this.visible16 = true;
    },
    //点击ok
    handleOk16() {
      this.visible16 = false;
    },
    //点击cancel
    handleCancel16() {
      this.visible16 = false;
    },
    showModal(a) {
      if(a == 1){
        this.showimg = 1;
      }else if(a == 2){
        this.showimg = 2;
      }else if(a == 3){
        this.showimg = 3;
      }else if(a == 4){
        this.showimg = 4;
      }else if(a == 5){
        this.showimg = 5;
      }else if(a == 6){
        this.showimg = 6;
      }
      this.visible = true;
    },
    showModal1(){
      this.visible1 = true;
    },
    handleOk() {
      this.visible = false;
    },
    handleCancel() {
      this.visible = false;
    },
    handleCancel1() {
      this.visible1 = false;
    },

    handleChange(info) {
      const status = info.file.status;
      if (status !== 'uploading') {
        console.log(info.file, info.fileList);
      }
      if (status === 'done') {
        this.$message.success(`${info.file.name} file uploaded successfully.`);
      } else if (status === 'error') {
        this.$message.error(`${info.file.name} file upload failed.`);
      }
    },
    customRequest(data) {
      const formData = new FormData()
      formData.append('fileName ', data.file)
      firetext(formData)
          .then(res => {//这里需要用箭头函数，如果不用箭头函数里面的 this 就不是外面那个 this
            console.log(res)
            this.spectrum = res.data.filedata;
            this.InParameter.uuid=res.data.uuid;
            this.InParameter2.uuids.push(res.data.uuid);
          })
          .catch(error => {
            console.log(error)
          })
    },
    tclick() {
      console.log(this.InParameter)
      check2_16_1(this.InParameter)
          .then(res => {
            console.log("打印结果");
            console.log(res);
            this.ans.center_refer_strength=res[0];
            this.ans.ratio_width_diameter_w=res[1];
            this.ans.normal_module_refer=res[2];
            this.ans.diameter_refer_strength_p=res[3];
            this.ans.diameter_refer_strength_w=res[4];
            this.ans.normal_modi_factor_w=res[5];
            this.ans.effect_width=res[6];
            this.ans.tran_de_dia_p=res[7];
            this.ans.tran_de_dia_w=res[8];
            this.ans.normal_width_tip_factor_p_sn=res[9];
            this.ans.normal_width_tip_factor_w_sn=res[10];
            this.ans.slip_p=res[11];
            this.ans.slip_w=res[12];
            this.ans.tran_contact_ratio=res[13];
            this.ans.axial_contact_ratio=res[14];
            this.ans.abundant_H_fatigue_p=res[15];
            this.ans.abundant_H_fatigue_w=res[16];
            this.ans.abundant_H_static_p=res[17];
            this.ans.abundant_H_static_w=res[18];
            this.ans.abundant_F_fatigue_p=res[19];
            this.ans.abundant_F_fatigue_w=res[20];
            this.ans.abundant_F_static_p=res[21];
            this.ans.abundant_F_static_w=res[22];
            this.ans.ratio_design=res[23];
            this.ans.ratio_different=res[24];
            this.ans.total_contact_ratio=res[25];
            this.ans.z_p_refer=res[26];
            this.ans.z_w_refer=res[27];
            this.ans.tran_practice_ad_dia_p=res[28];
            this.ans.tran_practice_ad_dia_w=res[29];
            this.ans.v_pitch=res[30];
            this.ans.thickness_reduction_last_p=res[31];
            this.ans.thickness_reduction_last_w=res[32];
            this.ans.z_w=res[33];
            this.ans.equal_normal_modi_factor_p=res[34];
            this.ans.equal_normal_modi_factor_w=res[35];
            this.ans.sigma_H_fatigue_design_p_ex=res[36];
            this.ans.sigma_H_fatigue_design_w_ex=res[37];
            this.ans.tran_pitch_p_ex=res[38];
            this.ans.tran_pitch_w_ex=res[39];
            this.ans.tran_base_dia_p_ex=res[40];
            this.ans.tran_base_dia_w_ex=res[41];
            this.ans.mesh_angle_ex=res[42];
            this.ans.base_helix_angle_ex=res[43];
            this.ans.n_p_ex=res[44];
            this.ans.n_w_ex=res[45];
            this.ans.sigma_HG_p_ex=res[46];
            this.ans.sigma_HG_w_ex=res[47];
            this.ans.sigma_F_fatigue_design_p_ex=res[48];
            this.ans.sigma_F_fatigue_design_w_ex=res[49];
            this.ans.sigma_FG_p_ex=res[50];
            this.ans.sigma_FG_w_ex=res[51];
            this.ans.tangential_load_0=res[52];
            this.ans.radial_load_0=res[53];
            this.ans.axial_load_0=res[54];
            this.ans.kf_0=res[55];
            this.ans.UL_0=res[56];
            this.ans.standard_center=res[57];
          })
          .catch(err => {
            this.$message.error(err);
          });
    },

  }

};
</script>

<style scoped>
.base
{
  width: 100%;
  height: 100%;
}
.table3
{
  margin-top: 6%;
}
.table3 li
{
  text-align: right;
  height: 6%;
}
.table4
{
  margin-top: 2%;
}
.table4 li
{
  text-align: center;
  display: flex;
  height: 6%;
  width: 100%;
}
.table5
{
  width: 50%;
}
li{
  list-style-type: none;
  width: 100%;
  height: 5%;
}
input {
  text-align: center;
  width: 10%;
  height: 8%;
}
label {
  text-align: center;
}
.img_style {
  width:90%;
  height: 100%;
  margin: 10% 10%;
}
.ul_style li {
  height: 10%;
  width: 100%;
}
#ul_style li
{
  height:7%;
}
.base {
  position: relative;
  width: 100%;
  height: 100%;
}
.u1 {
  border-width: 0px;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 5%;
  background: inherit;
  background-color: rgba(38, 36, 48, 1);
  border: none;
  border-radius: 0px;
  box-shadow: none;
}
.u1_font {
  position: absolute;
  left: 2%;
  font-family: 'Nunito Sans';
  font-weight: 400;
  font-style: normal;
  color: #FFFFFF;
}
.u2 {
  border-width: 0px;
  position: absolute;
  left: 0;
  top: 5%;
  width: 100%;
  height: 5%;
  background: inherit;
  background-color: rgba(240, 240, 240, 1);
  border: none;
  border-radius: 0px;
  box-shadow: 0px 2px 8px rgb(0 0 0
  );
}
.u2_font {
  position: absolute;
  left: 2%;
  word-wrap: break-word;
  text-transform: none;
}
.left {
  position: absolute;
  left: 2%;
  right: 1%;
  top: 1%;
  width: 95%;
  height: 98%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;

}
.u3 {
  border-width: 0px;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 15%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
  border: none;
  border-radius: 0px;
  box-shadow: none;
}
.u3_font {
  position: absolute;
  left: 2%;
  white-space: nowrap;
  text-transform: none;
}
.left_top {
  position: relative;
  top: 3%;
  width: 100%;
  height: 50%;
  background-color: #fff;
}
.left_top_left {
  position: absolute;
  left: 0;
  width: 50%;
  height: 100%;
}
.left_top_right {
  position: absolute;
  top: 1%;
  right: 1%;
  bottom: 1%;
  width: 48%;
  height: 100%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;

}
.u6 {
  border-width: 0px;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 5%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
  border: none;
  border-radius: 0px;
  box-shadow: none;
}
.u6_font {
  position: absolute;
  left: 2%;
  word-wrap: break-word;
  text-transform: none;
}
.left_top_left_top {
  top: 1%;
  width: 100%;
  height: 34%;
}
.left_top_left_bottom {
  position: absolute;
  left: 1%;
  right: 1%;
  bottom: -0.5%;
  width: 98%;
  height: 64%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.u5 {
  border-width: 5px;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 10%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
  border: none;
  border-radius: 0px;
  box-shadow: none;
}
.u5_font {
  position: absolute;
  left: 2%;
  word-wrap: break-word;
  text-transform: none;
}
.left_top_left_bottom1 {
  position: relative;
  top: 20%;
  width: 40%;
  height: 100%;
}
.left_top_left_bottom2 {
  position: absolute;
  top: 14%;
  right: 25%;
  width: 30%;
  height: 100%;
}
.left_top_left_bottom3 {
  position: absolute;
  top: 14%;
  right: 0;
  width: 30%;
  height: 100%;
}
.left_top_right1 {
  position: relative;
  width: 40%;
  height: 100%;
}
.left_top_right1 li
{
  height:7%;
}
.left_top_right2 {
  position: absolute;
  top: 0;
  right: 30%;
  width: 30%;
  height: 100%;
}
.left_top_right3 {
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
}

.left_bottom {
  position: relative;
  top: 4%;
  left: 1%;
  width: 98%;
  height: 45%;
  background: inherit;
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
  font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
  font-weight: 700;
  font-style: normal;
}
.u7 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6%;
  border-width: 0px;
  background: inherit;
  background-color: rgba(215, 215 ,215 ,1);
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.u7_font {
  position: absolute;
  left: 1%;
  word-wrap: break-word;
  text-transform: none;
}
.left_bottom_left {
  position: absolute;
  top: 5%;
  width: 35%;
  height: 100%;
}
.left_bottom_center {
  position: absolute;
  top: 7%;
  left: 35%;
  width: 30%;
  height: 100%;
}
.left_bottom_right {
  position: absolute;
  top: 5%;
  right: 0;
  width: 31%;
  height: 100%;
}
.left_bottom1 {
  position: relative;
  width: 57%;
  height: 100%;
}
.left_bottom2 {
  position: absolute;
  width: 43%;
  height: 100%;
  top: 0;
  right: 0;
}
.right {
  position: absolute;
  top: 1%;
  right: 2%;
  width: 100%;
  height: 100%;
  position: relative;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;

}
.u4 {
  border-width: 0px;
  position: absolute;
  left: 0;
  width: 100%;
  height: 3%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
  border: none;
  border-radius: 0px;
  box-shadow: none;
}
.u4_font {
  margin-right: 5%;
  word-wrap: break-word;
  text-transform: none;
}
.right_right {
  position: absolute;
  top: 3%;
  right: 0;
  width: 60%;
  height: 100%;
}.right_right li
 {
   height:3.3%;
 }
.right_left {
  position: absolute;
  top: 3%;
  width: 40%;
  height: 100%;
  position: relative;
}
.right_left_top1 {
  position: absolute;
  text-align: right;
  margin-left: 1%;
  width: 50%;
  height: 3%;
}
.right_left_top2 {
  position: absolute;
  right: 0;
  width: 50%;
  height: 3%;
}
.right_left_bottom {
  position: absolute;
  bottom: 0;
  text-align: right;
  width: 90%;
  height: 100%;
  top:4%;
}
.right_left_bottom li
{
  height:3.3%;
}
</style>
